﻿<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" default-lazy="true" namespace="Cms.Domain" assembly="Cms.Domain">
  <class name="ContentTranslationVersion" table="cmsContentTranslationVersion">
    <cache usage="read-write" />
    <id name="ID" type="System.Int32" unsaved-value="0">
      <column name="ID" />
      <generator class="identity" />
    </id>
    <property name="Timestamp" type="System.String">
      <column name="Timestamp" not-null="true" />
    </property>
    <property name="Html" type="System.String">
      <column name="Html" length="1000000" not-null="true" />
    </property>
    <property name="Title" type="System.String">
      <column name="Title" not-null="false" />
    </property>
    <bag name="PageContentSets" table="cmsPageContentSetTranslationVersion" mutable="true">
      <cache usage="read-write" />
      <key>
        <column name="TranslationVersionID" />
      </key>
      <many-to-many class="PageContentSet">
        <column name="ContentSetID" />
      </many-to-many>
    </bag>
    <bag name="MasterTemplateContentSets" table="cmsMasterTemplateContentSetTranslationVersion" mutable="true">
      <cache usage="read-write" />
      <key>
        <column name="TranslationVersionID" />
      </key>
      <many-to-many class="MasterTemplateContentSet">
        <column name="ContentSetID" />
      </many-to-many>
    </bag>
    <bag name="DetailTemplateContentSets" table="cmsDetailTemplateContentSetTranslationVersion" mutable="true">
      <cache usage="read-write" />
      <key>
        <column name="TranslationVersionID" />
      </key>
      <many-to-many class="DetailTemplateContentSet">
        <column name="ContentSetID" />
      </many-to-many>
    </bag>
    <many-to-one class="Administrator" name="Author">
      <column name="AdministratorID" not-null="true" />
    </many-to-one>
    <many-to-one class="ContentTranslation" name="Translation">
      <column name="TranslationID" not-null="true" />
    </many-to-one>
    <bag name="ScheduledPublishings" table="cmsScheduledPublishing" mutable="true" cascade="all-delete-orphan" inverse="true">
      <cache usage="read-write" />
      <key>
        <column name="ContentTranslationVersionID" />
      </key>
      <one-to-many class="ScheduledPublishing" />
    </bag>
  </class>
</hibernate-mapping>